package com.lhz;

import com.lhz.project.system.task.TaskManager;
import jakarta.annotation.Resource;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.DisposableBean;
import org.springframework.stereotype.Component;


/**
 * @Author: LiHuaZhi
 * @Date: 2021/8/31 17:40
 * @Description: 启动完成后加载
 **/
@Component
@Slf4j
public class BootApplicationDestroy implements DisposableBean {

    @Resource
    private TaskManager taskManager;

    @Override
    public void destroy() {
        log.info("==== 系统运行结束 ====");

        taskManager.destroyTask();
    }

}